home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 44 / Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso / -in_the_mag- / basics / amos / maxsamosdoors.lha / slowtext3.amos / slowtext3.amosSourceCode
AMOS Source Code  |  1999-01-01  |  2KB  |  79 lines

  1. P$=Command Line$
  2.  
  3. F= Extension_16_0006(Val(Right$(P$,2)))
  4.  
  5. LCOM=Len(P$)
  6.  
  7. If Len(P$)>2 Then P$=Left$(P$,Len(P$)-2)
  8.  
  9. Set Input 10,-1
  10.  
  11. Global SPEED
  12. Global A$
  13. Global LWAIT
  14.  
  15. If Not Exist(P$) Then P$="doors:stext/stext.txt"
  16.  
  17. Open In 1,P$
  18.  
  19. Line Input #1,S$
  20. SPEED=Val(S$)
  21. If SPEED<1 or SPEED>100 Then SPEED=5
  22.  
  23. Line Input #1,W$
  24. LWAIT=Val(W$)
  25. If LWAIT<1 or LWAIT>500 Then LWAIT=20
  26.  
  27. A$=Chr$(27)+"[2J"+Chr$(27)+"[0;0H"
  28. A= Extension_16_002A(A$)
  29. If A=20 Then BYE
  30.  
  31. Repeat 
  32.       Line Input #1,A$
  33.       If Left$(A$,1)="[" Then A= Extension_16_002A(Chr$(27)+A$) : A$="[" : If A=20 Then BYE
  34.       If Left$(A$,1)="%" Then SPEED=Val(Mid$(A$,2)) : A$="[" : If SPEED=0 Then SPEED=5
  35.       If SPEED>100 Then SPEED=5
  36.       If A$<>"[" Then _DISP[A$]
  37. Until Eof(1)
  38. Close 1
  39.  
  40. BYE
  41.  
  42. Procedure _DISP[A$]
  43.    If A$="" Then A$=" "
  44.    For Z=1 To Len(A$)
  45.       A= Extension_16_002A(Mid$(A$,Z,1))
  46.       If A=20 Then BYE
  47.       Wait SPEED
  48.    Next Z
  49.    A= Extension_16_002A(Chr$(10))
  50.    If A=20 Then BYE
  51.    Wait LWAIT
  52. End Proc
  53.  
  54. Procedure BYE
  55.     Extension_16_0018 
  56.    Close 
  57.    End 
  58. End Proc
  59.  
  60.  
  61. Procedure _PD[A$]
  62.  
  63.    For A=1 To Len(A$)
  64.       If Mid$(A$,A,1)<>Chr$(27) Then _DISP[Mid$(A$,A,1)] : Goto SLOOP
  65.  
  66.    For B=A To Len(A$)
  67.       If Mid$(A$,B,1)<"a" and Mid$(A$,B,1)>"z" and Mid$(A$,B,1)<"A" and Mid$(A$,B,1)>"Z" Then X$=X$+Mid$(A$,B,1)
  68.       If Mid$(A$,B,1)>="a" and Mid$(A$,B,1)>="A" and Mid$(A$,B,1)<="z" and Mid$(A$,B,1)<="Z" Then X$=X$+Mid$(A$,B,1) : Z=B+1 : B=Len(A$)+1
  69.    Next B
  70.  
  71.    If X$<>"" Then ZZ= Extension_16_002A(X$)
  72.    X$=""
  73.  
  74.    A$=Mid$(A$,Z)
  75.  
  76.    SLOOP:
  77.    Next A
  78.  
  79. End Proc